package com.coffee.admin.service.supplier.dao;

import com.coffee.admin.api.platform.rep.PlatformOperateRes;
import com.coffee.admin.api.supplier.query.SupplierQuery;
import com.coffee.admin.api.supplier.rep.SupplierListRep;
import com.coffee.admin.api.supplier.rep.SupplierOperateRes;
import com.coffee.admin.service.supplier.bean.Supplier;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SupplierDao {
    public Supplier findById(Integer id);

    public Supplier findByIdForUpdate(Integer id);

    public List<Supplier> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") SupplierQuery param);

    public Integer countByAdmin(@Param("param") SupplierQuery param);

    public List<Supplier> page(@Param("param") SupplierQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<Supplier> list(@Param("param") SupplierQuery param);

    public List<SupplierListRep> pageByAdmin(@Param("param") SupplierQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);


    public List<SupplierOperateRes> pageByPlatformOperateRes(@Param("param") SupplierQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public SupplierOperateRes findMerchantOperatorDetail(@Param("param") SupplierQuery param);

    public Supplier findFirst(@Param("param") SupplierQuery param);

    public Integer insert(Supplier param);

    Integer insertBatch(List<Supplier> list);

    public void updateById(@Param("param") Supplier param);

    public Integer deleteById(Integer id);

    public Integer deleteByIds(List<Integer> idList);

}